import math

proc onSquare*(n: int): uint64 = 
  if n < 1 or n > 64: raise newException(ValueError, "out of range")
  2u64 ^ (n - 1)

proc total*(): uint64 =
  high(uint64)